/**
 * 
 */
package com.google.code.cisx.wfe.model;

/**
 * AbstractArc connector that connects two disparate {@link Node}s in a
 * {@link Case}.
 * 
 * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
 * @since 1.0
 * @version $Id$
 */
public class AbstractArc<D, S extends PetriNetEntity<?>, T extends PetriNetEntity<?>>
        extends AbstractPetriNetEntity<D> {

    /**
     * Source {@link Node} that this AbstractArc originates from.
     */
    private S source;

    /**
     * Target {@link Node} that this AbstractArc connects to.
     */
    private T target;

    /**
     * @param source
     * @param target
     */
    public AbstractArc(S source, T target) {
        super(source.getLabel() + " _to_ " + target.getLabel()); // internal_label
        this.source = source;
        this.target = target;
    }

    /**
     * @return the source
     */
    public S getSource() {
        return source;
    }

    /**
     * @return the target
     */
    public T getTarget() {
        return target;
    }

}
